package com.cmb.lk50.common;

import com.cmb.lk50.common.extractor.NoneParamExtractor;
import com.cmb.lk50.common.extractor.QueryParamExtractor;
import com.cmb.lk50.common.receiver.HttpStatusReceiver;
import com.cmb.lk50.common.receiver.ResponseReceiver;
import com.cmb.lk50.pojo.AbstractLog;
import com.cmb.lk50.pojo.AccessInfo;
import com.cmb.lk50.sink.kafka.KafkaKeyGenerator;

import java.lang.annotation.*;

/**
 * Author       : 蒋俊钊 80256973
 * Date         : 2019/11/11
 * Copyright    (C) ChinaMerchantsBank
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface AccessLog {

    Class<? extends AbstractLog> value()
            default AccessInfo.class;

    Class<? extends QueryParamExtractor> extractor()
            default NoneParamExtractor.class;

    Class<? extends ResponseReceiver> receiver()
            default HttpStatusReceiver.class;

    Class<? extends KafkaKeyGenerator> kafkaKeyer()
            default KafkaKeyGenerator.class;

}